#-------------------------------------------------
#
# Project created by QtCreator 2018-03-18T23:23:46
#
#-------------------------------------------------

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = HeadCounter
TEMPLATE = app

# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0


SOURCES += main.cpp\
        Camera.cpp \
        mainwindow.cpp \
    dialogconfig.cpp \
    formcamera.cpp \
    HeadCounter.cpp \
    VideoSource.cpp \
    ImageCaster.cpp \
    CarriageValue.cpp \
    CountExceptionChecker.cpp \
    HistogramWidget.cpp \
    CameraCounter.cpp \
    CounterThread.cpp

HEADERS  += mainwindow.h \
    Camera.h \
    dialogconfig.h \
    formcamera.h \
    HeadCounter.h \
    VideoSource.h \
    ImageCaster.h \
    CarriageValue.h \
    CountExceptionChecker.h \
    HistogramWidget.h \
    CameraCounter.h \
    CounterThread.h

FORMS    += mainwindow.ui \
    dialogconfig.ui \
    formcamera.ui

RESOURCES += \
    headcounter.qrc

PROJECT_ROOT=$$PWD/..
COMN_DIR=$${PROJECT_ROOT}/comn
OPENCV_DIR="E:/opencv/vs/install"

OPENCV_INCLUDE=$${OPENCV_DIR}/include
OPENCV_LIBRARY_DIR=$${OPENCV_DIR}/x86/vc14/lib
OPENCV_LIBRARIES_DEBUG=-lopencv_core341d -lopencv_imgproc341d -lopencv_highgui341d -lopencv_video341d -lopencv_videoio341d -lopencv_imgcodecs341d
OPENCV_LIBRARIES_RELEASE=-lopencv_core341 -lopencv_imgproc341 -lopencv_highgui341 -lopencv_video341 -lopencv_videoio341 -lopencv_imgcodecs341


INCLUDEPATH += $${COMN_DIR}/include
LIBS += -L$${COMN_DIR}/lib/

INCLUDEPATH += $${OPENCV_INCLUDE}
LIBS += -L$${OPENCV_LIBRARY_DIR}


CONFIG(debug) {
    LIBS += -lcomnd $${OPENCV_LIBRARIES_DEBUG}
} else {
    LIBS += -lcomn $${OPENCV_LIBRARIES_RELEASE}
}

win32 {
    QMAKE_CXXFLAGS_WARN_ON += -wd4819 -wd4100
    LIBS += -lws2_32 -lIphlpapi -lUser32 -lAdvapi32 -lole32 -lOleAut32
}

RC_FILE = HeadCounter.rc
